<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
    class Eyeworx_Inventory_Sunglasses_RBO_RBOSunglasses extends RBO_Recordset {

        public function fields() {

            $fields = array();

            $brand = new RBO_Field_Text('Frame Brand');
            $brand->set_length(45)->set_required()->set_visible();
            $fields[] = $brand;

            $model = new RBO_Field_Text('Frame Model');
            $model->set_length(45)->set_visible()->set_required();
            $fields[] = $model;

            $rim = new RBO_Field_Text('Frame Rim');
            $rim->set_length(45)->set_visible()->set_required();
            $fields[] = $rim;

            $material = new RBO_Field_Text('Frame Material');
            $material->set_length(45)->set_required()->set_visible();
            $fields[] = $material;

            $color = new RBO_Field_MultiSelect('Frame Color', 'eyeworx_color', array('color_name'));
            $color->set_required()->set_visible()->set_filter();
            $fields[] = $color;

            $price = new RBO_Field_Currency('Price per Qty');
            $price->set_required()->set_visible();
            $fields[] = $price;

            $qty = new RBO_Field_Integer('Total Qty');
            $fields[] = $qty;

            return $fields;

        }

        public function table_name() {
            return 'eyeworx_sunglasses';
        }

    }
?>